package cn.edu.cimv.service.impl;

import cn.edu.cimv.dao.entity.Paper;
import cn.edu.cimv.dao.mapper.PaperMapper;
import cn.edu.cimv.service.PaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 门铎 on 2016/6/27.
 */
@Service
public class PaperServiceImpl implements PaperService {
    @Autowired private PaperMapper paperMapper;
    @Override
    public void editPaper(Paper paper) {
        paperMapper.insertPaper(paper);
    }

    @Override
    public List<Paper> queryPaper(int flag) {
        return paperMapper.queryPaper(flag);
    }
    @Override
    public List<Paper> queryPaperByPaperType(String paperType) {
        return paperMapper.queryPaperByPaperType(paperType);
    }
    @Override
    public void deletePaper(int id) {
        paperMapper.deletePaper(id);
    }

    @Override
    public Paper queryPaperById(int id) {
        return paperMapper.queryPaperById(id);
    }

    @Override
    public void updatePaper(Paper paper) {
        paperMapper.updatePaper(paper);
    }
}
